<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="common/include :: header('修改服务项')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-post-edit" >
        <input id="id" name="id" type="hidden" th:value="${customerLinkmen.id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">客户：</label>
            <div class="col-sm-8">
                <select class="form-control" name="customerId" >
                    <option th:each="dict : ${customerList}" th:text="${dict.customerName}" th:value="${dict.id}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">联系人：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="linkman" id="linkman" th:value="${customerLinkmen.linkman}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">性别：</label>
            <div class="col-sm-8">
                <select class="form-control" name="gender" th:field="${customerLinkmen.gender}" th:with="type=${@dict.getType('sys_user_sex')}">
                    <option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">年龄：</label>
            <div class="col-sm-8">
                <input class="form-control" type="number" name="age" id="age" th:value="${customerLinkmen.age}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">联系方式：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="phone" id="phone" th:value="${customerLinkmen.phone}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">职位：</label>
            <div class="col-sm-8">
                <select class="form-control" name="position">
                    <option th:each="dict : ${postList}" th:text="${dict.name}" th:value="${dict.id}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">任职状态：</label>
            <div class="col-sm-8">
                <select class="form-control" name="positionState" th:field="${customerLinkmen.positionState}" th:with="type=${@dict.getType('position_state')}">
                    <option value="">所有</option>
                    <option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">部门：</label>
            <div class="col-sm-8">
                <select class="form-control" name="department" >
                    <option th:each="dict : ${deptList}" th:text="${dict.name}" th:value="${dict.id}"></option>
                </select>
            </div>
        </div>
    </form>
</div>
<th:block th:include="common/include :: footer" />
<script type="text/javascript">
    var prefix = ctx + "/business/customerLinkmen";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
        }
    }
</script>
</body>
</html>